/* Dashboard Specific Styles */
:root {
  /* Use standard color variables from main styles.css */
  --dashboard-bg: var(--dark-bg);
  --dashboard-card-bg: var(--card-bg);
  --dashboard-header-bg: var(--darker-bg);
  --dashboard-border: var(--border-color);
  --dashboard-hover: rgba(255, 255, 255, 0.05);
  --dashboard-text-muted: var(--text-secondary);
  --dashboard-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --dashboard-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);

  /* Semantic Status Colors for Dashboard */
  --status-success: #10b981;
  --status-warning: #f59e0b;
  --status-error: #ef4444;
  --status-info: #3b82f6;
  --status-pending: #9ca3af;
  --status-active: #22c55e;

  /* Dashboard Layout Variables */
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 70px;
  --header-height: 70px;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dashboard-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
}

.loading-logo {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 2rem;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--dashboard-border);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

.loading-text {
  color: var(--gradient-primary);
  font-size: 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Dashboard Body */
.dashboard-body {
  background: var(--dashboard-bg);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Dashboard Header */
.dashboard-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--dashboard-header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--dashboard-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  background: var(--dashboard-hover);
  color: var(--primary-color);
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-2xl);
  font-family: var(--font-heading);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding: 0.5rem;
  border-radius: 12px;
  overflow: hidden;
}

.brand-link:hover::before {
  opacity: 1;
}

.brand-link:hover {
  transform: translateY(-2px);
  color: var(--primary-color, #0066ff);
  text-shadow: 0 0 20px rgba(0, 102, 255, 0.3);
}

.brand-icon {
  width: 36px;
  height: 36px;
  color: var(--secondary-color, #00ffcc);
  filter: drop-shadow(0 0 20px rgba(0, 255, 204, 0.5));
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
}

.brand-link:hover .brand-logo-img {
  filter: drop-shadow(0 0 25px rgba(0, 255, 204, 0.7));
}

.brand-text {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-tight);
  background: white;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.header-center {
  flex: 1;
  max-width: 600px;
  margin: 0 2rem;
}

.search-container {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dashboard-text-muted);
  font-size: 1rem;
}

.global-search {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  background: var(--dashboard-card-bg);
  border: 1px solid var(--dashboard-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.global-search:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.global-search::placeholder {
  color: var(--dashboard-text-muted);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--dashboard-card-bg);
  border: 1px solid var(--dashboard-border);
  border-radius: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1001;
  display: none;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.notification-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.notification-btn:hover {
  background: var(--dashboard-hover);
  color: var(--primary-color);
}

.notification-badge {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background: var(--accent-color-1);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.user-profile-dropdown {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.user-profile-btn:hover {
  background: var(--dashboard-hover);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
}

.user-name {
  font-weight: 500;
  font-size: 0.95rem;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 250px;
  background: var(--dark-bg);
  border: 1px solid var(--dashboard-border);
  border-radius: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--dashboard-shadow);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.user-dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* Support JS `.show` class for consistency across pages */
.user-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--dashboard-border);
}

.dropdown-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
}

.user-details .user-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.user-email {
  font-size: 0.85rem;
  color: var(--dashboard-text-muted);
}

.dropdown-divider {
  height: 1px;
  background: var(--dashboard-border);
  margin: 0.5rem 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.dropdown-item:hover {
  background: var(--dashboard-hover);
  color: var(--primary-color);
}

.dropdown-item.logout {
  color: var(--accent-color-1);
}

.dropdown-item.logout:hover {
  background: rgba(255, 51, 102, 0.1);
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background-color: var(--darker-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--dashboard-border);
  z-index: 999;
  transition: all 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-nav {
  padding: 1.5rem 0;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin-bottom: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 0 !important;
}

.nav-link:hover {
  background: var(--dashboard-hover);
  color: var(--text-primary);
}

.nav-item.active .nav-link {
  background: linear-gradient(90deg, rgba(0, 102, 255, 0.1), transparent);
  color: var(--primary-color);
  border-right: 3px solid var(--primary-color);
}

.nav-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.nav-text {
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.sidebar.collapsed .nav-text {
  opacity: 0;
}

.nav-badge {
  background: var(--primary-color);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  margin-left: auto;
  transition: opacity 0.3s ease;
}

.sidebar.collapsed .nav-badge {
  opacity: 0;
}

.sidebar-footer {
  position: absolute;
  bottom: 1rem;
  left: 1.5rem;
  right: 1.5rem;
  transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-footer {
  opacity: 0;
}

.usage-indicator {
  border: 1px solid var(--dashboard-border);
  border-radius: 12px;
  padding: 1rem;
}

.usage-label {
  font-size: 0.85rem;
  color: var(--dashboard-text-muted);
  margin-bottom: 0.5rem;
}

.usage-bar {
  background: rgba(255, 255, 255, 0.1);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.usage-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 3px;
  transition: width 0.3s ease;
}

.usage-text {
  font-size: 0.8rem;
  color: var(--dashboard-text-muted);
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  padding: 2rem;
  min-height: calc(100vh - var(--header-height));
  transition: margin-left 0.3s ease;
}

.sidebar.collapsed + .main-content {
  margin-left: var(--sidebar-collapsed-width);
}

.dashboard-section {
  display: none;
}

.dashboard-section.active {
  display: block;
}

.section-header {
  margin-bottom: 2rem;
}

.section-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--dashboard-text-muted);
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.metric-card {
  background: var(--dashboard-card-bg);
  border: 1px solid var(--dashboard-border);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.metric-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--dashboard-shadow-hover);
  border-color: var(--primary-color);
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.metric-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

.metric-content {
  flex: 1;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.95rem;
  color: var(--dashboard-text-muted);
  margin-bottom: 0.5rem;
}

.metric-change {
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.metric-change.positive {
  color: var(--secondary-color);
}

.metric-change.negative {
  color: var(--accent-color-1);
}

/* Quick Actions */
.quick-actions {
  margin-bottom: 3rem;
}

.quick-actions h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.action-btn.primary {
  background: white;
  color: var(--dark-bg);
}

.action-btn.primary:hover {
  box-shadow: 0 8px 25px rgba(0, 102, 255, 0.3);
}

.action-btn.secondary {
  background: var(--dashboard-card-bg);
  color: var(--text-primary);
  border: 1px solid var(--dashboard-border);
}

.action-btn.secondary:hover {
  background: var(--dashboard-hover);
  border-color: var(--primary-color);
}

.action-btn.tertiary {
  background: var(--dashboard-card-bg);
  color: var(--text-primary);
  border: 1px solid var(--dashboard-border);
}

.action-btn.tertiary:hover {
  background: var(--dashboard-hover);
  border-color: var(--primary-color);
}

.action-btn.quaternary {
  background: var(--dashboard-card-bg);
  color: var(--accent-color-4);
  border: 1px solid var(--accent-color-4);
}

.action-btn.quaternary:hover {
  background: rgba(255, 204, 0, 0.1);
  transform: translateY(-2px);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.dashboard-card {
  background: var(--dashboard-card-bg);
  border: 1px solid var(--dashboard-border);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  transition: all 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--dashboard-shadow-hover);
  border-color: rgba(0, 102, 255, 0.3);
}

.card-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--dashboard-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-content {
  padding: 1.5rem;
}

.chart-controls {
  display: flex;
  gap: 1rem;
}

.chart-period {
  background: var(--dashboard-card-bg);
  border: 1px solid var(--dashboard-border);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.view-all-btn,
.clear-all-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-all-btn:hover,
.clear-all-btn:hover {
  color: var(--secondary-color);
}

/* Activity Feed */
.activity-feed {
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--dashboard-border);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.activity-icon.success {
  background: rgba(0, 255, 204, 0.2);
  color: var(--secondary-color);
}

.activity-icon.info {
  background: rgba(0, 102, 255, 0.2);
  color: var(--primary-color);
}

.activity-icon.warning {
  background: rgba(255, 204, 0, 0.2);
  color: var(--accent-color-4);
}

.activity-icon.error {
  background: rgba(255, 51, 102, 0.2);
  color: var(--accent-color-1);
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.activity-description {
  font-size: 0.9rem;
  color: var(--dashboard-text-muted);
  margin-bottom: 0.5rem;
}

.activity-time {
  font-size: 0.8rem;
  color: var(--dashboard-text-muted);
}

/* Performance Chart */
.performance-legend {
  display: flex;
  gap: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--dashboard-text-muted);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* Projects Table */
.projects-table {
  width: 100%;
}

.table-header,
.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
}

.table-header {
  border-bottom: 1px solid var(--dashboard-border);
  font-weight: 600;
  color: var(--dashboard-text-muted);
  font-size: 0.9rem;
}

.table-row {
  border-bottom: 1px solid var(--dashboard-border);
  transition: all 0.3s ease;
}

.table-row:hover {
  background: var(--dashboard-hover);
}

.table-row:last-child {
  border-bottom: none;
}

.project-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.project-name {
  font-weight: 600;
  color: var(--text-primary);
}

.project-type {
  font-size: 0.85rem;
  color: var(--dashboard-text-muted);
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  width: fit-content;
}

.status-badge.completed {
  background: rgba(0, 255, 204, 0.2);
  color: var(--secondary-color);
}

.status-badge.running {
  background: rgba(0, 102, 255, 0.2);
  color: var(--primary-color);
}

.status-badge.failed {
  background: rgba(255, 51, 102, 0.2);
  color: var(--accent-color-1);
}

.progress-bar {
  background: rgba(255, 255, 255, 0.1);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-fill.error {
  background: var(--accent-color-1);
}

.progress-text {
  font-size: 0.8rem;
  color: var(--dashboard-text-muted);
}

.action-buttons-small {
  display: flex;
  gap: 0.5rem;
}

.action-btn-small {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--dashboard-hover);
  color: var(--dashboard-text-muted);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.action-btn-small:hover {
  background: var(--primary-color);
  color: white;
}

/* Notifications */
.notifications-list {
  max-height: 300px;
  overflow-y: auto;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  position: relative;
  transition: all 0.3s ease;
}

.notification-item:hover {
  background: var(--dashboard-hover);
}

.notification-item.high-priority {
  border-left: 4px solid var(--accent-color-1);
  background: rgba(255, 51, 102, 0.05);
}

.notification-item.medium-priority {
  border-left: 4px solid var(--accent-color-4);
  background: rgba(255, 204, 0, 0.05);
}

.notification-item.low-priority {
  border-left: 4px solid var(--secondary-color);
  background: rgba(0, 255, 204, 0.05);
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-item.high-priority .notification-icon {
  background: rgba(255, 51, 102, 0.2);
  color: var(--accent-color-1);
}

.notification-item.medium-priority .notification-icon {
  background: rgba(255, 204, 0, 0.2);
  color: var(--accent-color-4);
}

.notification-item.low-priority .notification-icon {
  background: rgba(0, 255, 204, 0.2);
  color: var(--secondary-color);
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.notification-message {
  font-size: 0.9rem;
  color: var(--dashboard-text-muted);
}

.notification-close {
  background: none;
  border: none;
  color: var(--dashboard-text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.notification-close:hover {
  background: var(--dashboard-hover);
  color: var(--text-primary);
}

/* Resource Usage */
.resource-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.resource-item:last-child {
  margin-bottom: 0;
}

.resource-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-weight: 500;
}

.resource-label i {
  color: var(--primary-color);
  width: 20px;
}

.resource-usage {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  margin-left: 2rem;
}

.resource-period {
  font-size: 0.9rem;
  color: var(--dashboard-text-muted);
}

/* Notification Panel */
.notification-panel {
  position: fixed;
  top: var(--header-height);
  right: -400px;
  width: 400px;
  height: calc(100vh - var(--header-height));
  background: var(--dashboard-sidebar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--dashboard-border);
  z-index: 1001;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.notification-panel.active {
  right: 0;
}
/* Support JS `.show` class for consistency across pages */
.notification-panel.show {
  right: 0;
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem !important;
}

.notification-header h3 {
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
}

.close-panel {
  background: none;
  border: none;
  color: var(--dashboard-text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.close-panel:hover {
  background: var(--dashboard-hover);
  color: var(--text-primary);
}

.notification-tabs {
  display: flex;
  border-bottom: 1px solid var(--dashboard-border);
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--dashboard-text-muted);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-btn:hover {
  background: var(--dashboard-hover);
}

.notification-list {
  padding: 1rem;
}

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.show {
  display: block;
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 992px) {
  .header-center {
    display: none;
  }
  .header-right {
    gap: 0.75rem;
  }
  .user-avatar {
    width: 32px;
    height: 32px;
  }
  .notification-btn {
    padding: 0.5rem;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 999;
    transition: transform 0.3s ease;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .dashboard-header {
    padding: 0 1rem;
  }

  .header-center {
    margin: 0 1rem;
  }

  .header-right {
    gap: 0.5rem;
  }

  .user-name {
    display: none;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-btn {
    justify-content: center;
  }

  .table-header,
  .table-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .table-cell {
    padding: 0.5rem 0;
  }

  .notification-panel {
    width: 100%;
    right: -100%;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 1rem;
  }

  .section-header h1 {
    font-size: 2rem;
  }

  /* Minimalist header adjustments */
  .dashboard-header {
    padding: 0 0.75rem;
  }
  .brand-logo-img {
    width: 25px;
    height: 25px;
  }
  .brand-text {
    font-size: 1rem;
  }
  .user-avatar {
    width: 28px;
    height: 28px;
  }
  .sidebar-toggle {
    font-size: 1.1rem;
  }

  .metric-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .card-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

/* Chart Containers */
.chart-card .card-content {
  height: 300px;
  position: relative;
}

.chart-card canvas {
  max-height: 100%;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--dashboard-border);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-card {
  animation: fadeInUp 0.6s ease forwards;
}

.metric-card:nth-child(1) {
  animation-delay: 0.1s;
}
.metric-card:nth-child(2) {
  animation-delay: 0.2s;
}
.metric-card:nth-child(3) {
  animation-delay: 0.3s;
}
.metric-card:nth-child(4) {
  animation-delay: 0.4s;
}

/* Focus States for Accessibility */
button:focus,
input:focus,
select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .sidebar,
  .dashboard-header,
  .dashboard-footer,
  .notification-panel {
    display: none;
  }

  .main-content {
    margin: 0;
    padding: 1rem;
  }

  .dashboard-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid var(--dashboard-border);
  }
}
/* Professional Dropdown Component Styles */

.professional-dropdown {
  position: relative;
  display: inline-block;
  min-width: 200px;
}

.professional-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 8px;
}

.professional-dropdown-trigger:hover {
  background: var(--dashboard-hover);
  border-color: var(--primary-color);
}

.professional-dropdown-trigger:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.professional-dropdown-trigger.active {
  border-color: var(--primary-color);
  background: var(--dashboard-hover);
}

.professional-dropdown-label {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.professional-dropdown-icon {
  color: var(--text-secondary);
  transition: transform 0.2s ease;
  font-size: 12px;
}

.professional-dropdown-trigger.active .professional-dropdown-icon {
  transform: rotate(180deg);
}

.professional-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--professional-dropdown-bg) !important;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  margin-top: 4px;
  max-height: 300px;
  overflow-y: auto;
}

.professional-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.professional-dropdown-search {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.professional-dropdown-search input {
  width: 100%;
  padding: 8px 12px;
  background: var(--darker-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.professional-dropdown-search input:focus {
  border-color: var(--primary-color);
}

.professional-dropdown-search input::placeholder {
  color: var(--text-secondary);
}

.professional-dropdown-list {
  padding: 8px 0;
}

.professional-dropdown-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 10px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.professional-dropdown-item:hover {
  background: var(--dashboard-hover);
  color: var(--primary-color);
}

.professional-dropdown-item.selected {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
}

.professional-dropdown-item.selected::after {
  content: "✓";
  margin-left: auto;
  color: var(--primary-color);
  font-weight: 600;
}

.professional-dropdown-item-icon {
  color: var(--text-secondary);
  font-size: 12px;
  width: 16px;
  text-align: center;
}

.professional-dropdown-item-text {
  flex: 1;
}

.professional-dropdown-item-badge {
  background: var(--primary-color);
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 500;
}

.professional-dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 8px 0;
}

.professional-dropdown-header {
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.professional-dropdown-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: var(--darker-bg);
}

.professional-dropdown-footer-btn {
  width: 100%;
  padding: 8px 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.professional-dropdown-footer-btn:hover {
  background: var(--primary-hover);
}

/* Multi-select dropdown styles */
.professional-dropdown.multi-select .professional-dropdown-item {
  padding-left: 40px;
  position: relative;
}

.professional-dropdown.multi-select .professional-dropdown-item::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-radius: 3px;
  background: transparent;
  transition: all 0.2s ease;
}

.professional-dropdown.multi-select
  .professional-dropdown-item.selected::before {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.professional-dropdown.multi-select
  .professional-dropdown-item.selected::after {
  content: "✓";
  position: absolute;
  left: 19px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 12px;
  font-weight: 600;
  margin-left: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .professional-dropdown {
    min-width: 150px;
  }

  .professional-dropdown-trigger {
    padding: 10px 12px;
    font-size: 13px;
  }

  .professional-dropdown-item {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* Animation for smooth transitions */
@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.professional-dropdown-menu.show {
  animation: dropdownSlideIn 0.2s ease;
}

/* Custom scrollbar for dropdown menu */
.professional-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.professional-dropdown-menu::-webkit-scrollbar-track {
  background: var(--darker-bg);
  border-radius: 3px;
}

.professional-dropdown-menu::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.professional-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}
